package com.example.qxfw.qxybzz.mapper;

import com.example.qxfw.qxybzz.entity.dto.PersonDto;
import com.example.qxfw.qxybzz.entity.vo.PersonVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Mapper
public interface PublishObjectMapper {
    List<PersonVo> getPagePerson(@Param("name") String name,
                                 @Param("workplace")String workplace,
                                 @Param("keyword")String keyword);

    @Delete("delete from person where id=#{id}")
    void deletePerson(Integer id);

    void deletePersons(Integer[] ids);

    void addPerson(@Param("name") String name,
                   @Param("workplace")String workplace,
                   @Param("position")String position,
                   @Param("phone")String phone);

    void updatePerson(PersonDto personDto);
}
